'use strict';
module.exports = {
	/**
	 * getIdiom
	 * @url client/template/kh/getIdiom 前端调用的url参数地址
	 * data 请求参数
	 * @param {String} params1  参数1
	 */
	main: async (event) => {
		let { data = {}, userInfo, util, filterResponse, originalParam } = event;
		let { customUtil, uniID, config, pubFun, vk, db, _ } = util;
		let { uid } = data;
		let res = { code: 0, msg: "" };
		// 业务逻辑开始-----------------------------------------------------------
		const { name1, name2 } = data;
		let result = {};
		result = await vk.request({
			url: `https://qltx.idatou.cn/api/word/list/secret?name1=${encodeURIComponent(name1)}&name2=${encodeURIComponent(name2)}`,
			method:"GET",
			header:{
				"content-type": "application/json; charset=utf-8",
			},
			data: {}
		});
		
		res = {
			code: 0,
			data: result.data,
			msg: ''
		}
		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}
